{
  "variables": [
    {
      "name": "start_time",
      "type": "PX_STRING",
      "description": "The start time of the window in time units before now.",
      "defaultValue": "-5m"
    },
    {
      "name": "namespace",
      "type": "PX_NAMESPACE",
      "description": "The namespace to filter on.",
      "defaultValue": ""
    },
    {
      "name": "topic",
      "type": "PX_STRING",
      "description": "The topic to filter on",
      "defaultValue": ""
    }
  ],
  "globalFuncs": [
    {
      "outputName": "kafka_flow_graph",
      "func": {
        "name": "kafka_flow_graph",
        "args": [
          {
            "name": "start_time",
            "variable": "start_time"
          },
          {
            "name": "ns",
            "variable": "namespace"
          },
          {
            "name": "topic",
            "variable": "topic"
          }
        ]
      }
    },
    {
      "outputName": "kafka_topics_overview",
      "func": {
        "name": "kafka_topics_overview",
        "args": [
          {
            "name": "start_time",
            "variable": "start_time"
          },
          {
            "name": "ns",
            "variable": "namespace"
          },
          {
            "name": "topic",
            "variable": "topic"
          }
        ]
      }
    },
    {
      "outputName": "kafka_brokers",
      "func": {
        "name": "kafka_brokers",
        "args": [
          {
            "name": "start_time",
            "variable": "start_time"
          },
          {
            "name": "ns",
            "variable": "namespace"
          },
          {
            "name": "topic",
            "variable": "topic"
          }
        ]
      }
    },
    {
      "outputName": "kafka_producers",
      "func": {
        "name": "kafka_producers",
        "args": [
          {
            "name": "start_time",
            "variable": "start_time"
          },
          {
            "name": "ns",
            "variable": "namespace"
          },
          {
            "name": "topic",
            "variable": "topic"
          }
        ]
      }
    },
    {
      "outputName": "kafka_consumers",
      "func": {
        "name": "kafka_consumers",
        "args": [
          {
            "name": "start_time",
            "variable": "start_time"
          },
          {
            "name": "ns",
            "variable": "namespace"
          },
          {
            "name": "topic",
            "variable": "topic"
          }
        ]
      }
    },
    {
      "outputName": "kafka_pods_flow_graph",
      "func": {
        "name": "kafka_pods_flow_graph",
        "args": [
          {
            "name": "start_time",
            "variable": "start_time"
          },
          {
            "name": "ns",
            "variable": "namespace"
          },
          {"name": "topic",
           "variable": "topic"
          }
        ]
      }
    }
  ],
  "widgets": [
    {
      "name": "Kafka Flow Graph",
      "position": {
        "x": 0,
        "y": 0,
        "w": 12,
        "h": 3
      },
      "globalFuncOutputName": "kafka_flow_graph",
      "displaySpec": {
        "@type": "types.px.dev/px.vispb.Graph",
        "adjacencyList": {
          "fromColumn": "src",
          "toColumn": "dest"
        },
        "edgeWeightColumn": "record_throughput",
        "enableDefaultHierarchy": true,
        "edgeHoverInfo": [
          "record_bytes_total",
          "record_throughput"
        ],
        "edgeLength": 300
      }
    },
    {
      "name": "Kafka Topics",
      "position": {
        "x": 0,
        "y": 3,
        "w": 12,
        "h": 2
      },
      "globalFuncOutputName": "kafka_topics_overview",
      "displaySpec": {
        "@type": "types.px.dev/px.vispb.Table"
      }
    },
    {
      "name": "Kafka Broker Pods",
      "position": {
        "x": 0,
        "y": 5,
        "w": 12,
        "h": 2
      },
      "globalFuncOutputName": "kafka_brokers",
      "displaySpec": {
        "@type": "types.px.dev/px.vispb.Table"
      }
    },
    {
      "name": "Kafka Producer Pods",
      "position": {
        "x": 0,
        "y": 7,
        "w": 6,
        "h": 2
      },
      "globalFuncOutputName": "kafka_producers",
      "displaySpec": {
        "@type": "types.px.dev/px.vispb.Table"
      }
    },
    {
      "name": "Kafka Consumer Pods",
      "position": {
        "x": 6,
        "y": 7,
        "w": 6,
        "h": 2
      },
      "globalFuncOutputName": "kafka_consumers",
      "displaySpec": {
        "@type": "types.px.dev/px.vispb.Table"
      }
    },
    {
      "name": "Kafka Pods Flow Graph",
      "position": {
        "x": 0,
        "y": 9,
        "w": 12,
        "h": 3
      },
      "globalFuncOutputName": "kafka_pods_flow_graph",
      "displaySpec": {
        "@type": "types.px.dev/px.vispb.Graph",
        "adjacencyList": {
          "fromColumn": "source",
          "toColumn": "destination"
        },
        "edgeWeightColumn": "request_throughput",
        "edgeThresholds": {
          "mediumThreshold": 100000000,
          "highThreshold": 500000000
        },
        "edgeHoverInfo": [
          "latency_p50",
          "latency_p90",
          "latency_p99",
          "request_throughput",
          "throughput_total"
        ],
        "edgeLength": 500
      }
    }
  ]
}
